package org.jeecg.modules.order.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.desensitization.annotation.SensitiveField;
import org.jeecg.common.desensitization.enums.SensitiveEnum;
import org.jeecg.modules.zixishi.entity.Quyu;
import org.jeecg.modules.zixishi.entity.Zixishi;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 订单
 * @Author: jeecg-boot
 * @Date:   2024-05-19
 * @Version: V1.0
 */
@Data
@TableName("sr_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="sr_order对象", description="订单")
public class Order implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**用户*/
    @Excel(name = "用户", width = 15,dictTable = "sys_user", dicText = "realname", dicCode = "id")
    @ApiModelProperty(value = "用户")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
    private String sysUserId;
	/**订单编号*/
	@Excel(name = "订单编号", width = 15)
    @ApiModelProperty(value = "订单编号")
    private String orderNum;
	/**订单名称*/
	@Excel(name = "订单名称", width = 15)
    @ApiModelProperty(value = "订单名称")
    private String orderName;
	/**订单状态*/
	@Excel(name = "订单状态", width = 15, dicCode = "order_status")
	@Dict(dicCode = "order_status")
    @ApiModelProperty(value = "订单状态")
    private String orderStatus;
	/**付款方式*/
	@Excel(name = "付款方式", width = 15, dicCode = "pay_type")
	@Dict(dicCode = "pay_type")
    @ApiModelProperty(value = "付款方式")
    private String payType;
	/**预留姓名*/
	@Excel(name = "预留姓名", width = 15)
    @ApiModelProperty(value = "预留姓名")
    private String uname;
	/**预留电话*/
	@Excel(name = "预留电话", width = 15)
    @ApiModelProperty(value = "预留电话")
    private String uphone;
	/**付款时间*/
	@Excel(name = "付款时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "付款时间")
    private Date payTime;
	/**订单金额*/
	@Excel(name = "订单金额", width = 15)
    @ApiModelProperty(value = "订单金额")
    private String orderMoney;
	/**开始时间*/
	@Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
	/**结束时间*/
	@Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;
	/**座位号*/
	@Excel(name = "座位号", width = 15, dictTable = "sr_seat", dicText = "name", dicCode = "id")
	@Dict(dictTable = "sr_seat", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "座位号")
    private String seatId;
	/**区域*/
	@Excel(name = "区域", width = 15, dictTable = "sr_quyu", dicText = "name", dicCode = "id")
	@Dict(dictTable = "sr_quyu", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "区域")
    private String quyuId;
	/**自习室*/
	@Excel(name = "自习室", width = 15, dictTable = "sr_zixishi", dicText = "name", dicCode = "id")
	@Dict(dictTable = "sr_zixishi", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "自习室")
    private String zixishiId;
    @Excel(name = "订单类型", width = 15,dicCode = "reserve_type")
    @Dict(dicCode = "reserve_type")
    private String reserveType;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**微信订单号*/
    @Excel(name = "微信订单号", width = 15)
    @ApiModelProperty(value = "微信订单号")
    private java.lang.String wxOrderId;
    /**退款金额*/
    @Excel(name = "退款金额", width = 15)
    @ApiModelProperty(value = "退款金额")
    private java.lang.String backMoney;
    /**退款状态*/
    @Excel(name = "退款状态", width = 15)
    @ApiModelProperty(value = "退款状态")
    private java.lang.String backStatus;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    @Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;

    private String qrcode;

    @TableField(exist = false)
    private Zixishi zixishi;
    @TableField(exist = false)
    private Quyu quyu;

    @TableField(exist = false)
    private Long payLeft;

    @Excel(name = "卡券", width = 15, dictTable = "sr_my_coupon", dicText = "coupon_name", dicCode = "id")
    @Dict(dictTable = "sr_my_coupon", dicText = "coupon_name", dicCode = "id")
    @ApiModelProperty(value = "卡券")
    private String myCouponId;

    private String voucherId;

    @Excel(name = "订单来源", width = 15,dicCode = "order_source")
    @Dict(dicCode = "order_source")
    private String orderSource;

    @TableField(exist = false)
    private String zixishiLogo;
    @TableField(exist = false)
    private String quyuLogo;
    @TableField(exist = false)
    private String realname;
    @TableField(exist = false)
    private String seatname;
    @TableField(exist = false)
    private Integer hours;
    @TableField(exist = false)
    private String month;
}
